Welcome to cloning exercise 60 and we are here to at their sport and our exercise this file is still
on the desktop and the Serbian part to financial data analysis.
And here we select the top of the notebook for coding exercise 16
and coding exercise 16 is all about the application of modern portfolio theory and asset pricing.
So let's have a look here first of all you have to import the data sets the U.S. stocks with six single
stocks and the S&P 500 Total Return and you chose to select a five year period.
And finally you should at the price data of the S&P 500 index to the data frame with the six stocks.
So you should create the adjusted net column market portfolio so the S&P 500 is here.
The market portfolio the applicable.
And then you are asked to calculate the simple daily returns for the six stocks and the market portfolio
and calculate annualized the risk and return.
And also here you can use a user defined function annualized the risk and return.
And again you should assume that the risk return is one point seven percent.
And with this you can calculate the following metrics for the six stocks and for the market portfolio.
So the sharp ratio then the total risk and variance units and the annualized covariance matrix and also
systematic risk and systematic risk beta and then the required return as per the cap M model.
And finally also the alpha.
And then you're asked to visualize systematic risk and and systematic risk for stocks and the market
portfolio in a bar chart.
And the question is which company most likely showed the highest portion of company specific risk.
That can be diversified away in the market portfolio.
And finally you should also visualize these security market line and determine the stocks that underperformed
and over performed the market in terms of systematic risk return.
So in a cap and framework and also you can find that guided and instructed option and also the hint
section at the very end so that's the coding exercise 60 and I hope you have fun and feel free to have
a look at these solutions notebook and solutions video by.